<%@page import="java.text.SimpleDateFormat" %>
<%@ page import="JurisPro.modelo.Local"%>
<%@ page import="JurisPro.modelo.Foro"%>

<jsp:include page="static/cabecalhoClean.jsp"/>


     <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CDCDCD">
     
     <tr>
       <td width="620" height="39" class="topicos">Editar Processo<br /></td>
     </tr>
   </table>
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td>&nbsp;</td>
       </tr>
     </table>
     
      <jsp:useBean id="processo" type="JurisPro.modelo.Processo" scope="request" />
       <div align="center">
     <form method="post" action="/JurisPro/do_it?" target="_top">
    <table width="90%" border="0" cellpadding="0" align="center" cellspacing="0" class="tabela">
	 <tr>
		<td width="24%">
			<div align="left" class="texto">N&ordm; da Pasta</div>
		</td>
		<td width="70%" height="30" colspan="2" align="left">
           <input name="comando" type="hidden" id="textfield" value="edit_processo" />
           <input title="*Pasta" name="pasta" type="text" id="textfield" size="20" value="<%=processo.getPasta() %>" /> 
       </td>    
    </tr>
    <tr>
	  <td>
         <div align="left" class="texto">Data de Entrada</div>
      </td>
      <td align="left">
           <label>
           <%	SimpleDateFormat formate = new SimpleDateFormat("dd/MM/yyyy"); %>
           
           <input title="*Data" name="data" type="text" id="textfield2" class="calendarSelectDate" size="20" value="<%=formate.format(processo.getDataEntrada())%>">
           <div id="calendarDiv"></div>
           </label>
      </td>
    </tr> 
    <tr>
	  <td> 
         <div align="left" class="texto">N&ordm; do Processo</div>
      </td>
      <td height="30" colspan="2" align="left">
           <label>
           <input title="*NumeroProcesso" name="numPro" type="text" id="textfield3" size="20" value="<%=processo.getNumProcesso() %>" />
           </label>
     </td>
     <tr>
		<td>
		  <div align="left" class="texto">Autor</div>
		</td>
	    <td height="30" colspan="2" align="left">
           <label>
           <input title="*Autor" name="autor" type="text" id="textfield4" size="44" value="<%=processo.getAutor() %>" />
           </label>
         </td>
    </tr>
	    <tr><td>
		<div align="left" class="texto">Parte</div>
		</td>
        <td height="30" colspan="2" align="left">
          <label>
           <input title="*Parte" name="parte" type="text" id="textfield5" size="44" value="<%=processo.getParte() %>" />
           </label>
    </td></tr>
	<tr>
		<td>
		<div align="left" class="texto">Quem &eacute; o cliente ?</div>
		</td>
		<td height="30" colspan="2" align="left"> 
       <label>
           
           <% if(processo.getCliente()){    %>
         <input type="radio" name="cliente" value="autor" id="Autor_0" checked="checked"/>
         <% }else {    %>
         <input type="radio" name="cliente" value="autor" id="Autor_0"/> 
          <% }%>
          Autor&nbsp;&nbsp;&nbsp;</label>
         <label>         
         <% if(!processo.getCliente()){    %>
         <input type="radio" name="cliente" value="parte" id="Autor_1" checked="checked" />
         <% } else {    %>
         <input type="radio" name="cliente" value="parte" id="Autor_1" />
         <%} %> 
            
           Parte</label>
           <br />
     </td>
     </tr>
     <jsp:useBean id="localidades" type="java.util.List<JurisPro.modelo.Local>" scope="request"/>
		<tr><td>
			<div align="left" class="texto">Localidade</div>
			</td>
		<td height="30" colspan="2" align="left">
           <label>
           <select name="local" id="select" style="width: 110px">
             <option> <%=processo.getLocal()%></option>
			<%for(Local localidade : localidades){ 
			 	if (localidade.toString().equals(processo.getLocal())) continue;%>
             		<option><%= localidade.toString() %></option>
             		<%} %>
           </select>
           
           </label>
           <label align="left" class="texto"> Outro local </label>

           <label>				
            <input name="outro" type="text" size="13" /></label>
          <label align="left" class="texto"> (ex.: cidade/UF) </label>
         </td></tr>
         <tr><td>
				<div align="left" class="texto">Foro</div>
				</td>
				<td height="30" colspan="2" align="left"> 
           <jsp:useBean id="foros" type="java.util.List<JurisPro.modelo.Foro>" scope="request"/>
				<label>				
          		 <select name="foro" id="select" style="width: 110px">
             		<option><%=processo.getForo()%> &nbsp;&nbsp;&nbsp;&nbsp;</option>
             		<%for(Foro foro : foros){ 
			 	if (foro.getForo().equals(processo.getForo())) continue;%>
             		<option><%= foro.getForo() %></option>
             		<%} %>
             		
           		</select></label>

           		<label align="left" class="texto"> Outro Foro </label>

           		<label>				
          		 <input name="outroForo" type="text" size="13" /></label>
         </td>
         </tr>
      <tr>
		<td></td>
		<td colspan="2" align="left">           
			<label>
				<input type="submit" value="Salvar" />
           </label>
         </td>
       </tr>
       <tr><td>
       </td>
       </tr>     
       </table>
     </form>
     </div>
     </td>
  </tr>
</table>
